package com.kim.nidoya.activity;

import com.kim.nidoya.R;
import com.kim.nidoya.utils.ActivityDispatchUtil;

import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;


/**
 * 个人中心界面
 * @author 
 *
 */
public class PersonalCenterActivity extends BaseActivity{
	
	ImageView head;//头像
	TextView number;//用户账户
	TextView money;//积分
	RelativeLayout my_collect;//我的收藏
	RelativeLayout reset_pw;//修改密码
	RelativeLayout bind;//绑定
	RelativeLayout weixin;//微信
	RelativeLayout sina;//新浪
	ImageView logout;//退出登录


	@Override
	protected void initParam() {
		
	}

	@Override
	protected void initView() {
		setContentView(R.layout.personal_center_layout);
		head = (ImageView) findViewById(R.id.personal_center_img_head);
		number = (TextView) findViewById(R.id.personal_center_txv_number);
		money = (TextView) findViewById(R.id.personal_center_txv_money);
		my_collect = (RelativeLayout) findViewById(R.id.personal_center_my_collect);
		reset_pw = (RelativeLayout) findViewById(R.id.personal_center_reset_pw);
		bind = (RelativeLayout) findViewById(R.id.personal_center_bind);
		weixin = (RelativeLayout) findViewById(R.id.personal_center_rl_weixin);
		sina = (RelativeLayout) findViewById(R.id.personal_center_rl_sina);
		logout = (ImageView) findViewById(R.id.personal_center_btn_logout);
		
		my_collect.setOnClickListener(this);
		reset_pw.setOnClickListener(this);
		bind.setOnClickListener(this);
		weixin.setOnClickListener(this);
		sina.setOnClickListener(this);
		logout.setOnClickListener(this);
	}
	
	@Override
	public void onClick(View v) {
		int vid = v.getId();
		switch (vid) {
		case R.id.personal_center_my_collect:
			ActivityDispatchUtil.openNewActivity(this, MyCollectActivity.class, PersonalCenterGroup.group, "MyCollectActivity");
			break;
		case R.id.personal_center_reset_pw:
			ActivityDispatchUtil.openNewActivity(this, RetsetPWActivity.class, PersonalCenterGroup.group, "RetsetPWActivity");
			break;
		case R.id.personal_center_rl_weixin:
			ActivityDispatchUtil.openNewActivity(this, BindWeixinActivity.class, PersonalCenterGroup.group, "BindWeixinActivity");
			break;
		case R.id.personal_center_rl_sina:
			ActivityDispatchUtil.openNewActivity(this, BindSinaActivity.class, PersonalCenterGroup.group, "BindSinaActivity");
			break;

		default:
			break;
		}
	}

}
